package com.jgsu.sell.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.jgsu.sell.dataobject.OrderDetail;
import com.jgsu.sell.utils.serializer.Date2LongSerializer;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 描述:
 * 订单传输对象
 *
 * @author lqd12
 * @create 2018-08-18 22:35
 */
@Data
//@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrderDto {

    private String orderId;
    /**
     * 订单收件人姓名
     */
    private String buyerName;
    /**
     * 电话
     */
    private String buyerPhone;
    /**
     * 地址
     */
    private String buyerAddress;
    /**
     * openid
     */
    private String buyerOpenid;
    /**
     * 订单总额
     */
    private BigDecimal orderAmount;
    /**
     * 订单状态
     */
    private Integer orderStatus;
    /**
     * 支付状态
     */
    private Integer payStatus;
    @JsonSerialize(using = Date2LongSerializer.class)
    private Date createTime;
    @JsonSerialize(using = Date2LongSerializer.class)
    private Date updateTime;
    private List<OrderDetail> orderDetailList  = new ArrayList<>();
}